<%-- 
    Document   : HomeContent
    Created on : Aug 28, 2011, 12:22:19 PM
    Author     : NHAnh - nhanh@fit.hcmus.edu.vn
--%>

<%@page import="model.pojo.Sach"%>
<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<table width="100%">
    <!--StartBook-->
    <%
        ArrayList<Sach> saches = (ArrayList<Sach>) request.getAttribute("Saches");
        for (int i = 0; i < saches.size(); i++) {
            Sach s = saches.get(i);

    %>
    <tr>
        <td>           
            <table width="100%" border="1">
                <tr>
                    <td width="10%" rowspan="5" valign="top"><img src="<%=s.getHinhAnh()%>" width="80" height="120" /></td>
                    <td>Tên sách : <%=s.getTenSach()%></td>
                </tr>
                <tr>
                    <td>Giá bán : <%=s.getGiaBan()%> VNĐ</td>
                </tr>
                <tr>
                    <td>Số lượng tồn: <%=s.getSoLuong()%></td>
                </tr>
                <tr>
                    <td><a href="BookDetailController?Action=View&MaSach=<%=s.getMaSach()%>">Xem chi tiết</a></td>
                </tr>
                <tr>
                    <td><a href="ShoppingCardController?Action=Purchase&MaSach=<%=s.getMaSach()%>">Đặt mua</a></td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td><hr /></td>
    </tr>
    <%}%>
</table>
